Passed
Push — development ( 728961...14dd4a )
by André
02:13
created

input.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 13
c 1
b 0
f 0
nc 1
dl 0
loc 20
rs 9.75
nop 2
1
module.exports = (input, callback) => {
2
	const validate = require('./validate')
3
	let error = null
4
	let output
5
6
	validate(input, (validatedInput, thrownError) => {
7
		input = validatedInput
8
		error = thrownError
9
	})
10
11
	output = {
12
		'version': {'ref': 'input'},
13
		'metadata': [
14
			{'name': 'topic', 'value': 'Hulk Hogan'},
15
			{'name': 'timestamp', 'value': Date.now().toString()}
16
		]
17
	}
18
19
	callback(error, output)
20
}
21